import { CustomRoute } from '@/interface'
import { RouteNameMap } from '../helpers'
import { EnumRoutePath, EnumRouteTitle } from '@/enum'
import { BasicLayout } from '@/layouts'
import { Document } from '@vicons/carbon'
import { VueDoc, ViteDoc, NaiveDoc } from '@/views/document'

const DOCUMENT: CustomRoute = {
  name: RouteNameMap.get('document'),
  path: EnumRoutePath.document,
  component: BasicLayout,
  redirect: { name: RouteNameMap.get('document_vue') },
  meta: {
    title: EnumRouteTitle.document,
    icon: Document,
  },
  children: [
    {
      name: RouteNameMap.get('document_vue'),
      path: EnumRoutePath.document_vue,
      component: VueDoc,
      meta: {
        title: EnumRouteTitle.document_vue,
      },
    },
    {
      name: RouteNameMap.get('document_vite'),
      path: EnumRoutePath.document_vite,
      component: ViteDoc,
      meta: {
        title: EnumRouteTitle.document_vite,
      },
    },
    {
      name: RouteNameMap.get('document_naive'),
      path: EnumRoutePath.document_naive,
      component: NaiveDoc,
      meta: {
        title: EnumRouteTitle.document_naive,
      },
    },
  ],
}

export default DOCUMENT
